package io.bdmc.modules.bss.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.baomidou.mybatisplus.annotation.TableId;
import java.time.LocalDateTime;
import java.io.Serializable;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
/**
 * <p>
 * 
 * </p>
 *
 * @author HuangLu
 * @since 2019-03-07
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
public class SmkMessage extends Model<SmkMessage> {

    private static final long serialVersionUID = 1L;

    @TableId(value = "msg_id", type = IdType.AUTO)
    private Long msgId;

    /**
     * 1=短信，2=语音，3=微信
     */
    private Integer msgType;

    /**
     * 信息接收人
     */
    private String msgTo;

    /**
     * 接收人手机
     */
    private String msgMobile;

    /**
     * 信息详情
     */
    private String msgDetail;

    /**
     * 错误码，0 表示成功（计费依据），非 0 表示失败
     */
    private String resultCode;

    /**
     * 错误消息，result 非 0 时的具体错误信息
     */
    private String resultMsg;

    /**
     * 标识本次发送 id，标识一次下发记录
     */
    private String callid;

    /**
     * 时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private LocalDateTime joinDate;


    @Override
    protected Serializable pkVal() {
        return this.msgId;
    }

    @Override
    public String toString() {
        return "SmkMessage{" +
        "msgId=" + msgId +
        ", msgType=" + msgType +
        ", msgTo=" + msgTo +
        ", msgMobile=" + msgMobile +
        ", msgDetail=" + msgDetail +
        ", resultCode=" + resultCode +
        ", resultMsg=" + resultMsg +
        ", callid=" + callid +
        ", joinDate=" + joinDate +
        "}";
    }
}
